package fr.umlv.escape_ig.weapon;

import fr.umlv.escape_ig.sprite.Sprite;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class Ball extends Sprite {

        private final Paint paint;
        private final static float SPEED = 10.0f; 
        
        
        public Ball(float left, float top, float right, float bottom) {
                super(left, top, right, bottom);
                this.paint = new Paint();
                paint.setColor(Color.YELLOW);
        }

        @Override
        public void draw(Canvas canvas) {
                canvas.drawCircle(rect.centerX(), rect.centerY(), rect.width()/2.0f, paint);
        }

        @Override
        public void update() {
                this.rect.set(rect.left, rect.top-SPEED, rect.right, rect.bottom-SPEED);                
        }
                
}